<template>
  <div id="app">
    <MyHeader v-if="this.$route.meta.tabbar"></MyHeader>
    <transition name="fade" mode="out-in"><!--<transition>标签让路由有过渡动画 ,-->
      <router-view></router-view>
    </transition>
    <Myfooter v-if="this.$route.meta.tabbar"></Myfooter>
  </div>
</template>

<script>
import MyHeader from "./components/head"
import Myfooter from "./components/foot"
export default {
  name: 'app',
  components:{
    MyHeader,Myfooter
  },
  mounted: function(){
    this.$nextTick(()=>{
      this.getToken();//定时获取token
    })
    //App高度设置
    let WH = $(window).height();
    $("#app").height(WH);
  }
}
</script>

<style>
#app {
  width: 100%;
  float: left;
  background-image: -webkit-linear-gradient(to right, #012d47, #011b32);
  background-image: linear-gradient(to right, #012d47, #011b32);
}
.fade-enter{
opacity: 0;
}
.fade-enter-active{
transition:opacity .3s;
}
.fade-leave{
opacity:1;
}
.fade-leave-active{
opacity:0;
transition:opacity .3s;
}
</style>
